from django.urls import re_path

from .apps import ApprovalConfig

from .views import *

app_name = ApprovalConfig.name


urlpatterns = [
    # Application
    re_path(r'^applications/$', ApplicationListView.as_view(), name='applications'),
    re_path(r'^application/(?P<pk>[0-9]+)/$', ApplicationDetailView.as_view(), name='application'),
    re_path(r'^application_add/$', ApplicationCreateView.as_view(), name='application_add'),
    re_path(r'^application_submit/(?P<pk>[0-9]+)/$', ApplicationSubmitView.as_view(), name='application_submit'),
    re_path(r'^application_approve/(?P<pk>[0-9]+)/$', ApplicationApproveView.as_view(), name='application_approve'),
    re_path(r'^application_change/(?P<pk>[0-9]+)/$', ApplicationUpdateView.as_view(), name='application_change'),
    # Project
    re_path(r'^projects/$', ProjectListView.as_view(), name='projects'),
    re_path(r'^project/(?P<pk>[0-9]+)/$', ProjectDetailView.as_view(), name='project'),
    re_path(r'^project_change/(?P<pk>[0-9]+)/$', ProjectUpdateView.as_view(), name='project_change'),
    re_path(r'^management/$', ManagementView.as_view(), name='management'),
    re_path(r'^cost_profit/$', CostProfitView.as_view(), name='cost_profit'),
]
